class AddDownloads < ActiveRecord::Migration
  def up
    create_table "downloads", :force => true do |t|
      t.string   "app"
      t.string   "remote_ip"
      t.datetime "created_at",       :null => false
      t.string   "terminal_version"
      t.string   "app_version"
    end


    add_index :downloads, :app

    rename_table :installations, :apps
    drop_table :admin_users

    rename_table :installations_terminals, :terminals_apps
    rename_column :terminals_apps, :installation_id, :app_id
  end

  def down
  end
end
